import {createI18n} from 'vue-i18n';
import en from './lang/en.js';
import zh from './lang/zh.js';

const messages = { en, zh };

export default createI18n({
    legacy: false,
    locale: import.meta.env.SSR ? 'zh' : (localStorage.getItem('lang') || 'zh'),
    fallbackLocale: 'en',
    messages
});
